//
//  SpritesLayer.m
//  AngerDragon
//
//  Created by gaotime_macbook_2 on 11-12-4.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "ScreenSpritesLayer.h"
 
 
 
@implementation ScreenSpritesLayer

@synthesize m_p_can_be_attacked_sprite_array;
@synthesize m_p_not_can_be_attacked_sprite_array;
@synthesize m_p_props_array;
@synthesize m_p_enemy_bullet_array;
@synthesize m_p_player_bullet_array;
@synthesize m_p_sprite_bones_array;

@synthesize m_p_player;


static ScreenSpritesLayer *m_p_cls_screen_sprite_layer;

/// 单例方法
+ (ScreenSpritesLayer *) sharedScreenSpritesLayer {
	NSAssert(m_p_cls_screen_sprite_layer != nil, @"m_p_cls_screen_sprite_layer is null!");
	return m_p_cls_screen_sprite_layer;
}


- (id) init {
	
	if ((self = [super init])) {
		CCLOG(@"%@: %@", NSStringFromSelector(_cmd), self);
		
		NSAssert(m_p_cls_screen_sprite_layer == nil, @"重复init对象!");
		m_p_cls_screen_sprite_layer = self;
	}
	
	return self;
}

- (void) dealloc {
	CCLOG(@"%@: %@", NSStringFromSelector(_cmd), self);
	
	/// 
	m_p_cls_screen_sprite_layer = nil;
	
	[m_p_can_be_attacked_sprite_array release];
	[m_p_not_can_be_attacked_sprite_array release];
	[m_p_props_array release];
	[m_p_enemy_bullet_array release];
	[m_p_player_bullet_array release];
	[m_p_sprite_bones_array release];
	
	[m_p_player release];
	
	[super dealloc];
}
@end
